<template>
  <div class="tree">
    <el-tree v-bind="$attrs" v-on="$listeners"></el-tree>
  </div>
</template>

<script>
export default {
  name: "TTree",
  data() {
    return {}
  },
  methods: {},
  mounted: function () {}
}
</script>

<style lang="less" scoped>
.tree {
  /*有子节点，并且已经展开*/

  /deep/ .el-tree-node__expand-icon.el-icon-caret-right::before {
    //background: url("./folder_open.png") no-repeat 0 3px;
    content: '1';
  }
  /deep/ .el-tree-node__expand-icon.el-icon-caret-right.expanded{
    transform:rotate(0deg);
    &::before{
      content: '2';
    }
  }

  /*没有子节点，就是一个文件*/

  /deep/ .el-tree-node__expand-icon.is-leaf::before {
    //background: url("./file.png") no-repeat 0 3px;
    content: '2';
    //display: block;
    //width: 16px;
    //height: 21px;
    //font-size: 16px;
    //background-size: 16px;
  }
}
</style>